package com.maben.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 员工
 */
@Data
@TableName("tb_user")
public class User {
    @TableId(type = IdType.AUTO)
    @Excel(name = "序号")
    private Long id;         //主键
    @Excel(name = "员工名",isImportField = "true")//,isImportField = "true"导入时，解析这个字段
    private String userName; //员工名
    @Excel(name = "手机号",type = 1,width = 15,isImportField = "true") //type:1文本  2图片  3函数  10数字
    private String phone;    //手机号
    @Excel(name = "省份",isImportField = "true")
    private String province; //省份名
    @Excel(name = "城市",isImportField = "true")
    private String city;     //城市名
    @Excel(name = "工资",isImportField = "true")
    private Integer salary;   // 工资
    @JsonFormat(pattern="yyyy-MM-dd")
    @Excel(name = "入职日期",format = "yyyy-MM-dd",width = 15,isImportField = "true")
    private Date hireDate; // 入职日期
    @Excel(name = "出生日期",format = "yyyy-MM-dd",width = 15,isImportField = "true")
    private Date birthday; //出生日期
    @Excel(name = "现居住地",width = 30,isImportField = "true")
    private String address;  //现在居住地址
    @Excel(name = "一寸照片",type = 2,width = 25,isImportField = "true",savePath = "/opt/test_img")//savePath：Excel中存放的照片路径
    private String photo;    //一寸照片
    private String deptId;   //部门id


}
